<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
    <!-- <BookList :tableData="tableData"></BookList> -->
    <router-link to="/init" >图书列表</router-link>
    <router-link to="/add-book" >增加图书</router-link>
    <router-link to="/update-book" >修改列表</router-link>

    <!-- 占位符,组件加载的位置 -->
    <router-view></router-view>
    
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import Book from './components/Book.vue';
import BookList from './components/BookList.vue';

export default {
  name: 'App',
  components: {
    HelloWorld,
    BookList
  },
  data:function(){
        return{
          msg:"helloworld",
          books:[
            {msg:"hello1",title:"book1"},
            {msg:"hello2",title:"book2"},
            {msg:"hello3",title:"book3"},
            {msg:"hello4",title:"book4"},
          ]  ,
          tableData: [{
            date: '2016-05-02',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1518 弄',
            score:3.7
          }, {
            date: '2016-05-04',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1517 弄',
            score:2.5
          }, {
            date: '2016-05-01',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1519 弄',
            score:3.7
          }, {
            date: '2016-05-03',
            name: '王小虎',
            address: '上海市普陀区金沙江路 1516 弄',
            score:1.9
          }]
        }
    }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
